//
//  UserAddAPI.m
//  StarOrangeStaff
//
//  Created by lshenrong on 2020/7/7.
//  Copyright © 2020 lshenrong. All rights reserved.
//

#import "UserAddAPI.h"

@interface  UserAddAPI()

@property (nonatomic,assign) NSInteger wayId;
@property (nonatomic,copy) NSString *userName;
@property (nonatomic,copy) NSString *password;
@property (nonatomic,copy) NSString *cardId;
@property (nonatomic,copy) NSString *onboardingDate;
@property (nonatomic,assign) NSInteger phoneNumber;
@property (nonatomic,copy) NSString *address;
@property (nonatomic,copy) NSString *remark;
@property (nonatomic,copy) NSArray *roleId;

@end


@implementation UserAddAPI

- (instancetype)initWithUserWayId:(NSString *)userWayId {
    if (self = [super init]) {
        self.wayId = [userWayId integerValue];
        [self testDataAPI];
       
    }
    return self;
}

- (void)testDataAPI {
    self.userName = @"test";
    self.wayId = 1;
    self.cardId = @"450821";
    self.phoneNumber = 18520701023;
    self.address = @"广州";
    self.onboardingDate = @"2020-07-07 11:46:35";
    self.remark = @"123456";
    self.roleId = @[@"1",@"2"];
}

- (NSString *)requestUrl {
    return @"message/user/addUserInfo";
}



- (id)requestAppendArgument{
    AvoidNullString(self.userName);
    AvoidNullString(self.cardId);
    AvoidNullString(self.address);
    AvoidNullString(self.onboardingDate);
    AvoidNullString(self.remark);
    
     return @{
                @"userName":self.userName,
                @"wayId":@(self.wayId),
                @"cardId":self.cardId,
                @"phoneNumber":@(self.phoneNumber),
                @"address":self.address,
                @"ionboardingDate":self.onboardingDate,
                @"remark":self.remark,
                @"roleId":self.roleId
       };
}

@end
